'use strict';

var entityController = require('../controllers/Entity.server.controller');

module.exports = function(app) {
    app.route('/api/entity/save').post(entityController.save);
    app.route('/api/entity/saves').post(entityController.saves);

    app.route('/api/entity/updateByValue').post(entityController.updateByValue);

    app.route('/api/entity/delete').post(entityController.delete);
    app.route('/api/entity/deletes').post(entityController.deletes);
    app.route('/api/entity/deleteById').post(entityController.deleteById);
    app.route('/api/entity/deleteByIds').post(entityController.deleteByIds);

    app.route('/api/entity/find').post(entityController.find);
    app.route('/api/entity/findById').post(entityController.findById);
    app.route('/api/entity/findOne').post(entityController.findOne);
    app.route('/api/entity/search').post(entityController.search);

    app.route('/api/entity/pageQuery').post(entityController.pageQuery);
    app.route('/api/entity/queryRecordCount').post(entityController.queryRecordCount);
    app.route('/api/entity/findRecordIndex').post(entityController.findRecordIndex);
};